<?php get_header(); ?>

	<div id="content" class="narrowcolumn">

	<?php if (have_posts()) : ?>

		<?php while (have_posts()) : the_post(); ?>

			<div class="post" id="post-<?php the_ID(); ?>">
			
								<div class="PostHead">
	<div class="PostTime"><?php the_time('<b>H:i</b> <a>d-m-Y</a>') ?> </div>
	<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
	<small class="PostDet"><?php edit_post_link('Edit', '', ' | '); ?> Tác giả: <?php the_author() ?> | Mặt hàng: <?php the_category(', ') ?></small>
	<div style="clear:both"></div>
	</div>

			<div class="entry">
				<p>
					<?php if(has_post_thumbnail()) {
						echo '<a style="float: left; margin-right: 10px" href="'; the_permalink(); echo '">';the_post_thumbnail(array(300, 300)); echo '</a>';
					} else {
						$image = get_first_image(); 
						if ($image):
							echo '<a style="float: left; margin-right: 10px" href="'; the_permalink(); echo'"><img width="300" src="'.$image.'" alt="';the_title();echo'" /></a>';
						endif;
					} ?>
					<?php //echo get_the_content();
					$postexcerpt = get_the_content();
					$postexcerpt = apply_filters('the_content', $postexcerpt);
					$postexcerpt = str_replace(']]>', ']]&gt;', $postexcerpt);
					$postexcerpt = strip_tags($postexcerpt);
					$postexcerpt = strip_shortcodes($postexcerpt); ?>
					<?php echo truncate($postexcerpt, 700, '&nbsp;&nbsp;<i>[<a class="more" href="'.get_permalink().'">Xem tiếp...</a>]</i>'); ?>
				</p>
			</div>
			<div style="clear:both"></div>
			</div>	
			
			<p class="postmetadata">
			<span class="tags"><?php the_tags('Tags: ', ', '); ?> </span>
			</p>
			<div class="comments">
				<?php comments_popup_link('NO COMMENTS', '<span> 1 </span> COMMENTS', '<span> % </span> COMMENTS'); ?></div>


		<?php endwhile; ?>

	

	<?php else : ?>

		<h2 class="center">Not Found</h2>
		<p class="center">Sorry, but you are looking for something that isn't here.</p>
		<?php include (TEMPLATEPATH . "/searchform.php"); ?>

	<?php endif; ?>
    
    

	</div>

<?php get_sidebar(); ?>
<div class="sidebar-right"> 
	<div class="twitter">
	<div class="twitter-content">
			<ul id="twitter_update_list"><li></li></ul></div>
			<script type="text/javascript" src="http://twitter.com/javascripts/blogger.js"></script>
			<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/gopalraju.json?callback=twitterCallback2&amp;count=1"></script>
	<a class="followme" href="http://twitter.com/gopalraju">Follow us on twitter</a>
	</div>

	<img src="<?php bloginfo('template_url'); ?>/images/pdlogo.gif" alt="productivedreams" class="pdlogo"/>

</div>



<div class="google-ads">

</div>


</div>

<?php get_footer(); ?>
